﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using LinFu.IoC.Configuration;

namespace CoreEx.Database.Client.Implementation
{
    [Implements(typeof(IDefaultConnection),LifecycleType.Singleton)]
    public class DefaultConnection : IDefaultConnection
    {
        public DefaultConnection()
        {
            Selector = (connections) => connections.Last();
        }

        #region IDefaultConnection Members

        public Func<IEnumerable<IConnectionInfo>, IConnectionInfo> Selector { get; set;}        

        #endregion
    }
}
